<?php
/**
 * Created by PhpStorm.
 * User: tsy
 * Date: 2016/11/1
 * Time: 15:36
 */
namespace Admin\Controller\Customer;
use Think\Controller;
use Admin\Controller\Common\BaseController;

class ValidateApiController extends BaseController{
    function validate_identity(){
        $cust_name=I("post.cust_name","");
        $cust_identity=I("post.cust_identity","");

        $ar_api=new \Admin\Controller\Common\AnRongApiController();
        $result=$ar_api->personIdCard_for_Impl($cust_name,$cust_identity,"","");

        if($result==1){
            $message="验证成功";
        }else if($result==2){
            $message="姓名与身份证不一致";
        }else if($result==3){
            $message="接口出错！";
        }else if($result==4){
            $message="返回数据为空";
        }
        $array['state']=$result;
        $array['message']=$message;
        $this->ajaxReturn(json_encode($array));
    }
}